package com.gillion.grape.fros.core.meta;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.java.amateras.uml.classdiagram.model.GeneratorType;
import net.java.amateras.uml.classdiagram.model.OptimisticLockType;

/**
 * 类元数据
 * 
 * @author meichenhui
 * @since 2011-8-30
 * 
 */
public class FrosClass {
	private List<Map<String,String>> oneToManyRelationExtends;
	private List<Map<String,String>> manyToOneRelationExtends;
	
	/**
	 * GFA类型
	 */
	private GFAClassType gfaType = GFAClassType.Other;

	public GFAClassType getGfaType() {
		return gfaType;
	}

	public void setGfaType(GFAClassType gfaType) {
		this.gfaType = gfaType;
	}

	/**
	 * 接口标志
	 */
	private boolean isInterface;

	public boolean isInterface() {
		return isInterface;
	}

	public void setInterface(boolean isInterface) {
		this.isInterface = isInterface;
	}

	/**
	 * 类名称
	 */
	private String name;
	/**
	 * 包名称
	 */
	private String packageName;
	/**
	 * 引用
	 */
	private List<String> imports = new ArrayList<String>();
	/**
	 * 属性
	 */
	private List<FrosProperty> properties = new ArrayList<FrosProperty>();
	/**
	 * 方法
	 */
	private List<FrosMethod> methods = new ArrayList<FrosMethod>();

	/**
	 * 视图实体
	 */
	private boolean viewEntity = false;
	
	/**
	 * 生成Service 
	 */
	private boolean genService = false;

	/**
	 * 纵向扩展实体
	 */
	private boolean verticalExtend = false;

	/**
	 * flex包名称
	 */
	private String flexPackageName;
	
	private String english;
	private String simplifiedChinese;
	private String traditionalChinese;
	
	/**
	 * 主键生成规则
	 */
	private GeneratorType generator = GeneratorType.UUID_HEX;
	
	private OptimisticLockType optimisticLock  = OptimisticLockType.VERSION;
	
	private String parentService = new String();
	
	private String hbmtemplate = "templates/xml_entity_hbm.jet";
	
	private String deltemplate ="templates/java_service_impl.jet";
	
	private boolean voEntity; // 是否是VO
	
	private String suffix;//实体追加代码
	
	private boolean cache;
	
	private String customTableName;
	
	public String getHbmtemplate() {
		return hbmtemplate;
	}

	public void setHbmtemplate(String hbmtemplate) {
		this.hbmtemplate = hbmtemplate;
	}

	public String getParentService() {
		return parentService;
	}

	public void setParentService(String parentService) {
		this.parentService = parentService;
	}

	public String getEnglish() {
		return english;
	}

	public void setEnglish(String english) {
		this.english = english;
	}

	public String getSimplifiedChinese() {
		return simplifiedChinese;
	}

	public void setSimplifiedChinese(String simplifiedChinese) {
		this.simplifiedChinese = simplifiedChinese;
	}

	public String getTraditionalChinese() {
		return traditionalChinese;
	}

	public void setTraditionalChinese(String traditionalChinese) {
		this.traditionalChinese = traditionalChinese;
	}

	public String getFlexPackageName() {
		return flexPackageName;
	}

	public void setFlexPackageName(String flexPackageName) {
		this.flexPackageName = flexPackageName;
	}

	public List<FrosMethod> getMethods() {
		return methods;
	}

	public void setMethods(List<FrosMethod> methods) {
		this.methods = methods;
	}

	public List<FrosProperty> getProperties() {
		return properties;
	}

	public void setProperties(List<FrosProperty> properties) {
		this.properties = properties;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public List<String> getImports() {
		return imports;
	}

	public void setImports(List<String> imports) {
		this.imports = imports;
	}

	public boolean isViewEntity() {
		return viewEntity;
	}

	public void setViewEntity(boolean viewEntity) {
		this.viewEntity = viewEntity;
	}

	public boolean isVerticalExtend() {
		return verticalExtend;
	}

	public void setVerticalExtend(boolean verticalExtend) {
		this.verticalExtend = verticalExtend;
	}

	public GeneratorType getGenerator() {
		return generator;
	}

	public void setGenerator(GeneratorType generator) {
		this.generator = generator;
	}

	public OptimisticLockType getOptimisticLock() {
		return optimisticLock;
	}

	public void setOptimisticLock(OptimisticLockType optimisticLock) {
		this.optimisticLock = optimisticLock;
	}

	public String getDeltemplate() {
		return deltemplate;
	}

	public void setDeltemplate(String deltemplate) {
		this.deltemplate = deltemplate;
	}

	public List<Map<String,String>> getOneToManyRelationExtends() {
		return oneToManyRelationExtends;
	}

	public void setOneToManyRelationExtends(List<Map<String,String>> oneToManyRelationExtends) {
		this.oneToManyRelationExtends = oneToManyRelationExtends;
	}

	public List<Map<String,String>> getManyToOneRelationExtends() {
		return manyToOneRelationExtends;
	}

	public void setManyToOneRelationExtends(List<Map<String,String>> manyToOneRelationExtends) {
		this.manyToOneRelationExtends = manyToOneRelationExtends;
	}

	public boolean isVoEntity() {
		return voEntity;
	}

	public void setVoEntity(boolean voEntity) {
		this.voEntity = voEntity;
	}

	public boolean isCache() {
		return cache;
	}

	public void setCache(boolean cache) {
		this.cache = cache;
	}

	public String getSuffix() {
		return suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}

	public String getCustomTableName() {
		return customTableName;
	}

	public void setCustomTableName(String customTableName) {
		this.customTableName = customTableName;
	}

	public boolean isGenService() {
		return genService;
	}

	public void setGenService(boolean genService) {
		this.genService = genService;
	}
	
}
